package Server.Dwc.fish;

public class CommonData {
	private CommonData _instance = null;

	//mapCannonLevel配置
	public static int g_mapCannonLevel[][] = {
		    {1,0},
		    {2,0},
		    {3,0},
		    {4,0},
		    {5,0},
		    {6,200},
		    {7,300},
		    {8,500},
		    {9,750},
		    {10,1000},
		    {15,1500},
		    {20,2000},
		    {25,2500},
		    {30,3000},
		    {35,3500},
		    {40,4000},
		    {45,4500},
		    {50,5000},
		    {60,6000},
		    {70,6000},
		    {80,8000},
		    {90,9000},
		    {100,10000},
		    {150,10000},
		    {200,10000},
		    {250,10000},
		    {300,20000},
		    {350,20000},
		    {400,20000},
		    {450,20000},
		    {500,30000},
		    {600,30000},
		    {700,30000},
		    {800,30000},
		    {900,30000},
		    {1000,50000},//POKECITY SSYXT
		    {1500,50000},
		    {2000,50000},
		    {3500,50000},
		    {4000,50000},
		    {4500,50000},
		    {5000,80000},
		    {6000,80000},
		    {7000,80000},
		    {8000,100000},
		    {9000,100000},
		    {10000,200000},
	}; 
	public CommonData getInstance(){
		if(_instance == null){
			_instance = new CommonData();
		}
		return _instance;
	}
	public void initCommonData(){
		//初始化鱼的配置
		/*
			 class FishConfig{
				public int m_iType;
				public int m_iOdds;
				public int m_iBlood;
				public int m_iSpeed;
				public int m_iBornLimit;
				public int m_iMaxLimit;
			}
		 */
		FishTable.g_mapFishCfg.put(1,new FishConfig(1,2,2,130,7,0));//小刺鱼,1
		FishTable.g_mapFishCfg.put(2,new FishConfig(2,2,2,130,7,0));//小草鱼,2
		FishTable.g_mapFishCfg.put(3,new FishConfig(3,3,4,130,5,0));//小黄鱼,3
		FishTable.g_mapFishCfg.put(4, new FishConfig(4,4,4,130,5,0));//泡泡鱼,4
		FishTable.g_mapFishCfg.put(5,new FishConfig(5,5,6,130,5,0));//小紫鱼,5
		FishTable.g_mapFishCfg.put(6,new FishConfig(6,6,6,130,5,0));//尼莫,   6
		FishTable.g_mapFishCfg.put(7,new FishConfig(7,7,7,130,5,0));//河豚,7
		FishTable.g_mapFishCfg.put(8,new FishConfig(8,8,8,130,4,0));//蓝鱼,8
		FishTable.g_mapFishCfg.put(9,new FishConfig(9,9,10,130,3,0));//灯笼鱼,9
		FishTable.g_mapFishCfg.put(10,new FishConfig(10,12,12,130,3,0));//神仙鱼, 10
		FishTable.g_mapFishCfg.put(11,new FishConfig(11,10,12,130,3,0));//乌龟,11
		FishTable.g_mapFishCfg.put(12,new FishConfig(12,15,16,130,3,4));//蝴蝶鱼,12
		FishTable.g_mapFishCfg.put(13,new FishConfig(13,18,18,130,3,3));//孔雀鱼, 13
		FishTable.g_mapFishCfg.put(14,new FishConfig(14,20,20,130,3,3));//箭鱼,14
		FishTable.g_mapFishCfg.put(15,new FishConfig(15,25,25,130,3,3));//蝙蝠鱼, 15
		FishTable.g_mapFishCfg.put(16,new FishConfig(16,35,35,130,1,2));//大白鲨, 16
		FishTable.g_mapFishCfg.put(17,new FishConfig(17,40,40,130,1,2));//大金鲨, 17
		FishTable.g_mapFishCfg.put(18,new FishConfig(18,60,60,130,3,3));//蜻蜓鱼,18
		FishTable.g_mapFishCfg.put(19,new FishConfig(19,30,30,130,3,3));//龙虾, 19
		FishTable.g_mapFishCfg.put(20,new FishConfig(20,80,80,130,1,1));//海豚, 20
		FishTable.g_mapFishCfg.put(21,new FishConfig(21,150,150,130,1,1));//金龙, 21
		FishTable.g_mapFishCfg.put(22,new FishConfig(22,100,100,130,1,1));//绿蟾, 22
		FishTable.g_mapFishCfg.put(23,new FishConfig(23,200,200,130,1,1));//黄金鱼, 23
		FishTable.g_mapFishCfg.put(31,new FishConfig(31,200,300,130,1,2));//金蟾, 31
		FishTable.g_mapFishCfg.put(32,new FishConfig(32,200,200,130,1,2));//金水母, 32
		FishTable.g_mapFishCfg.put(33,new FishConfig(33,250,250,130,1,2));//大金龟, 33
		FishTable.g_mapFishCfg.put(34,new FishConfig(34,150,200,130,1,2));//金头鱼, 34
		FishTable.g_mapFishCfg.put(35,new FishConfig(35,100,100,130,1,2));//闪闪金鲨, 35
		FishTable.g_mapFishCfg.put(36,new FishConfig(36,200,200,130,1,1));//金乌贼, 36
		FishTable.g_mapFishCfg.put(51,new FishConfig(51,500,500,130,1,1));//BOSS美人鱼
		FishTable.g_mapFishCfg.put(52,new FishConfig(52,800,1200,130,1,1));//BOSS孙悟空
		FishTable.g_mapFishCfg.put(53,new FishConfig(53,600,600,130,1,1));//BOSS人鱼公主
		FishTable.g_mapFishCfg.put(101,new FishConfig(101,20,40,130,1,2));//小三元
		FishTable.g_mapFishCfg.put(102,new FishConfig(102,30,50,130,1,2));//大三元
		FishTable.g_mapFishCfg.put(103,new FishConfig(103,40,60,130,1,2));//大三元
		
		//初始化炮台升级信息
		String upgrade = 
				  "1,100,2,200,3,300,4,400,5,500,6,600,7,700,8,800,9,900,10,1000,15,1500,20,2000,"+
				  "25,2500,30,3000,35,3500,40,4000,45,1500,50,5000,60,6000,70,7000,80,8000,90,9000,"+
				  "100,10000,120,12000,150,15000,180,18000,200,20000,250,25000,280,28000,300,30000,"+
				  "350,35000,380,38000,400,40000,450,45000,480,48000,500,50000,550,55000,580,58000,"+
				  "600,60000,650,65000,680,68000,700,70000,50,75000,780,78000,800,80000,850,85000,"+
				  "900,90000,950,95000,980,98000,1000,100000,1500,100000,2000,100000,2500,100000,"+
				  "3000,100000,3500,100000,4000,100000,4500,100000,5000,100000,5500,100000,"+
				  "6000,100000,6500,100000,7000,100000,7500,100000,8000,100000,8500,100000,"+
				  "9000,100000,9500,100000,10000,100000";
		
		String[] vecArg2 = upgrade.split(",");
		FishTable.g_vecCannonLevels.add(0);
		FishTable.g_needCoins.add(0);
		for(int i = 0;i < vecArg2.length / 2;i++){
			int cannonLevel = Integer.parseInt(vecArg2[i * 2]);
			int needCoin = Integer.parseInt(vecArg2[i * 2 +1]);
			
			FishTable.g_vecCannonLevels.add(cannonLevel);
			FishTable.g_needCoins.add(needCoin);
		}	
		
	}
}
